<template>
  <el-row justify="space-around" style="margin-top: 30px">
    <VisitsCount title="今日访问次数" :num="todaySum" />
    <VisitsCount title="累积访问次数" :num="accumulateSum" />
  </el-row>
</template>
<script setup>
import VisitsCount from '@/components/VisitsCount';
// import FaultCount from '../../components/faultCount.vue'
import { getVisitNum } from '@/api/activeFault'

const todaySum = ref(0)
const accumulateSum = ref(0)
const visitiNum = () => {
  getVisitNum().then(res => {
    todaySum.value = res.data?.todaySum || 0
    accumulateSum.value = res.data?.accumulateSum || 0
  })
}

onMounted(() => {
  visitiNum()
})
</script>